(function() {
    'use strict';

    angular
        .module('OnlineCashierdesk')
        .config(config);

    /** @ngInject */
    function config($logProvider, toastrConfig ,$httpProvider,$provide) {
        // Enable log
        $logProvider.debugEnabled(true);
        // Set options third-party lib
        toastrConfig.allowHtml = true;
        toastrConfig.timeOut = 2000;
        toastrConfig.positionClass = 'toast-top-center';
        toastrConfig.preventOpenDuplicates = true;
        toastrConfig.progressBar = false;

        $httpProvider.interceptors.push('httpInterceptor');

        // $provide.decorator('$rootScope', [
        //     '$delegate', function ($delegate) {
        //     Object.defineProperty($delegate.constructor.prototype,
        //     '$bus', {
        //         value: window.postal,
        //         enumerable: false
        //     });
        //     return $delegate;
        // }]);
    }
})();
